package service;

import dao.impl.UserDaoImpl;
import lombok.Getter;
import lombok.Setter;
import pojo.FastUser;

/**
 * @Author: fancyears·milos·malvis
 * @Description:
 * @Date: Created in  2019/4/16 10:51
 * @Modified By:
 */
public class UserService {

    @Setter
    @Getter
    private UserDaoImpl userDaoImpl;
    @Getter
    private String daoClassConname;
    private Integer index;

    public UserService() {
    }

    public UserService(UserDaoImpl userDaoImpl) {
        this.userDaoImpl = userDaoImpl;
    }

    public UserService(String daoClassConname, Integer index) {
        this.daoClassConname = daoClassConname;
        this.index = index;
    }
    public boolean insert(FastUser user) {
        return userDaoImpl.insert(user) > 0 ? true : false;
    }
}
